
module.exports = function (app) {
  const { router, middleware } = app;
 
  const prefix = '/api/user';
  const controller = app.controller.user;


  router.post(prefix + '/register', controller.register);
  router.post(prefix + '/login', controller.login);

  router.get(prefix + '/list', controller.list);
  router.get(prefix + '/:id', controller.getUserById);
  router.post(prefix + '/updatePassword', controller.
    updatePassword);
  router.post(prefix + '/update', controller.
    update);
  router.post(prefix + '/delete', controller.delete);
  router.post(prefix + '/check-status', middleware.auth(),  controller.checkStatus);
};
